﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Battle;
using LitJson;

namespace ItemComponent
{
    /// <summary>
    /// 电弧
    /// </summary>
    public class ElectricitySender : Gun
    {
        protected async override void FireAsync(ICanHitObj target)
        {
            if (target != null)
                await BulletFactory.CreateBulletAsync<Bullet_Electricity>(GetBulletData(target), BulletFactory.ElectricityPath);
        }

#if UNITY_EDITOR
        public new static STMyComponetData GetMyComponetData(ST_GunData gunData)
        {
            STMyComponetData componentData = Gun.GetMyComponetData(gunData);
            componentData.strType = typeof(ElectricitySender).FullName;

            return componentData;
        }
#endif
    }
}